package edu.zut.cs.software.cms.module.attendance.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.zut.cs.software.cms.base.domain.BaseTreeEntity;

@Entity
@Table(name = "T_ATTENDANCE")
public class Attendance extends BaseTreeEntity<Attendance, Long> {
	private static final long serialVersionUID = -3199029100807028476L;
	/**
	 * 
	 */
	@OneToMany(mappedBy = "attendance", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	List<AttendanceRate> attendanceRates;
	/**
	 * student class
	 */
	@Column
	String clas;
	/**
	 * student ID
	 */
	@Column
	String code;
	/**
	 * name of attendance
	 */
	@Column
	String name;
	/**
	 * attendance status
	 */
	@Column
	String status;

	/**
	 * class time
	 */
	@Column
	String time;

	/**
	 * @return the attendanceRates
	 */
	public List<AttendanceRate> getAttendanceRates() {
		return attendanceRates;
	}

	/**
	 * @return the clas
	 */
	public String getClas() {
		return clas;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * @return the time
	 */
	public String getTime() {
		return time;
	}

	/**
	 * @param attendanceRates the attendanceRates to set
	 */
	public void setAttendanceRates(List<AttendanceRate> attendanceRates) {
		this.attendanceRates = attendanceRates;
	}

	/**
	 * @param clas the clas to set
	 */
	public void setClas(String clas) {
		this.clas = clas;
	}

	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * @param time the time to set
	 */
	public void setTime(String time) {
		this.time = time;
	}
}